package com.itdong.vc;

import lombok.Data;

//后端返回前端数据统一处理
@Data
public class ResultVc {
    private Boolean flag;
    private Object data;
    private String msg;


    //请求失败/成功，并携带信息
    public ResultVc(Boolean flag, String msg) {
        this.flag = flag;
        this.msg = msg;
    }

    //请求成功并携带信息
    public ResultVc(Object data, String msg) {
        this.flag = true;
        this.data = data;
        this.msg = msg;
    }
}
